<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html lang="en">
  <style>
    label, input { display:block; }
    input.text { margin-bottom:12px; width:95%; padding: .4em; font-size: 62.5%;}
    fieldset { padding:0; border:0; margin-top:25px; font-size: 62.5%;}
    h1 { font-size: 1.2em; margin: .6em 0; font-size: 62.5%;}
    div#users-contain { width: 350px; margin: 20px 0; font-size: 62.5%;}
    div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; font-size: 62.5%;}
    div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; font-size: 62.5%;}
    .ui-dialog .ui-state-error { padding: .3em;}
    .validateTips { border: 1px solid transparent; padding: 0.3em; font-size: 62.5%;}
    .ui-button.ui-widget .ui-button-text{line-height:15px; font-size: 62.5%;}
    .ui-dialog .ui-dialog-titlebar-close span{background-image: url(${initParam.root}images/ui-icons_0073ea_256x240.png);}  
  </style>  
  <script>  
  $(function() {
    var dialog_login_admin,
      // From http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state-%28type=email%29
      name = $( "#name" ),
      email = $( "#email" ),
      password = $( "#password" ),
      allFields = $( [] ).add( name ).add( email ).add( password ),
      tips = $( ".validateTips" );
   
  	//dialog_login config
    dialog_login_admin = $( "#dialog_login_admin" ).dialog({
      autoOpen: false,
      resizable: false,
      height: 300,
      width: 350,
      modal: true,
      buttons: {
        "로그인":function(){
        	loginForm[0].submit();
        }
      },
      close: function() {
    	loginForm[0].reset();
        allFields.removeClass( "ui-state-error" ); //새로 열 경우 적용된 error 관련 클래스 삭제
      }
    });
  	   
  	
  	//dialog form config
    loginForm = dialog_login_admin.find("#loginForm").on("submit", function( event ) {
      event.preventDefault(); //submit을 하지 않게하는 메서드
      //addUser();
    });
  	
    dialog_login_admin.dialog( "open" );
  });
</script>
<div id="dialog_login_admin">
  <p class="validateTips">관리자 로그인</p> 
  <form method="post" id="loginForm" action="${initParam.root }member/loginAdmin.do">
    <fieldset>
      <label for="email">Email</label>
      <input type="text" name="email" id="email" class="text ui-widget-content ui-corner-all">
      <label for="password">Password</label>
      <input type="password" name="password" id="password" class="text ui-widget-content ui-corner-all">
 
      <!-- Allow form submission with keyboard without duplicating the dialog button -->
      <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
    </fieldset>
  </form>
</div>